#ifndef SERVER_H
#define SERVER_H

#include <QWidget>
#include <QTcpServer>
#include <QTcpSocket>
#include <QFile>

namespace Ui {
class Server;
}

class Server : public QWidget
{
    Q_OBJECT

public:
    explicit Server(QWidget *parent = nullptr);
    ~Server();

private:
    Ui::Server *ui;

    QTcpServer *server;
    QTcpSocket *serverSocket;
    QFile file;
    QStringList list;

    // 上传文件总大小
    qint64 fileTotalSize = 0;

    // 已上传文件的大小
    qint64 fileUploadedSize = 0;
};

#endif // SERVER_H
